﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.Skins;
using DevExpress.LookAndFeel;
using DevExpress.UserSkins;
using DevExpress.XtraBars;
using DevExpress.XtraBars.Ribbon;
using DevExpress.XtraBars.Helpers;
using CNotebook;
using CNotebook.Sales;
namespace NotebookS2
{
    public partial class SalesReturnDistribution : RibbonForm
    {
        public SalesReturnDistribution()
        {
            InitializeComponent();
        }

        public string DocumentNumber { get; set; }
        public string ConnectionString { get; set; }

        private void SalesReturnDistribution_Load(object sender, EventArgs e)
        {
            SalesReturnManager oManager = new SalesReturnManager();
            DataTable dt = new DataTable();

            oManager.ConnectionString = this.ConnectionString;
            oManager.Open();

            dt = oManager.GetAccountingDistribution(this.DocumentNumber);

            oManager.Close();


            gridControl1.DataSource = dt;
            gridControl1.Refresh();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
